/**
 * 
 */
package cn.com.xf.web.form;

import java.math.BigDecimal;
import java.text.SimpleDateFormat;

import org.hibernate.validator.constraints.NotEmpty;

import cn.com.xf.domain.TblOaSoft;

/**
 * @author Administrator
 * 
 */
public class SoftForm extends BaseForm {
	private Integer fileId;
	private String id;
	@NotEmpty(message = "软件名称不能为空")
	private String name;
	private String type;
	private String publicDate;
	private String publicMan;
	private String downfileName;
	private BigDecimal fileSize;
	private String typeId;
	@NotEmpty(message = "软件描述不能为空")
	private String desc;
	private String createDateBegin;
	private String createDateEnd;
	private String tempFileId;
	private String toZB;
	private String toZJ;
	private String toFJ;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getCreateDateBegin() {
		return createDateBegin;
	}

	public void setCreateDateBegin(String createDateBegin) {
		this.createDateBegin = createDateBegin;
	}

	public String getCreateDateEnd() {
		return createDateEnd;
	}

	public void setCreateDateEnd(String createDateEnd) {
		this.createDateEnd = createDateEnd;
	}

	public Integer getFileId() {
		return fileId;
	}

	public void setFileId(Integer fileId) {
		this.fileId = fileId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getPublicDate() {
		return publicDate;
	}

	public void setPublicDate(String publicDate) {
		this.publicDate = publicDate;
	}

	public String getPublicMan() {
		return publicMan;
	}

	public void setPublicMan(String publicMan) {
		this.publicMan = publicMan;
	}

	public String getDownfileName() {
		return downfileName;
	}

	public void setDownfileName(String downfileName) {
		this.downfileName = downfileName;
	}

	public BigDecimal getFileSize() {
		return fileSize;
	}

	public void setFileSize(BigDecimal fileSize) {
		this.fileSize = fileSize;
	}

	public String getTypeId() {
		return typeId;
	}

	public void setTypeId(String typeId) {
		this.typeId = typeId;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public TblOaSoft copyTo() throws Exception {
		TblOaSoft coreFile = new TblOaSoft();
		coreFile.setFileName(this.name);
		coreFile.setFileDesc(desc);
		coreFile.setPublicMan(publicMan);
		coreFile.setTypeId(BigDecimal.valueOf(Long.valueOf(typeId)));
		coreFile.setPublicDate(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(this.publicDate));
		coreFile.setDateStr(this.publicDate);
		coreFile.setToZB(this.toZB);
		coreFile.setToZJ(this.toZJ);
		coreFile.setToFJ(this.toFJ);
		// MultipartFile file = getMultipartFile();
		// coreFile.setDownfileName(file.getOriginalFilename());
		// coreFile.setFileSize((BigDecimal.valueOf(file.getSize() / 1024)));

		return coreFile;
	}

	public String getTempFileId() {
		return tempFileId;
	}

	public void setTempFileId(String tempFileId) {
		this.tempFileId = tempFileId;
	}

	public String getToZB() {
		return toZB;
	}

	public void setToZB(String toZB) {
		this.toZB = toZB;
	}

	public String getToZJ() {
		return toZJ;
	}

	public void setToZJ(String toZJ) {
		this.toZJ = toZJ;
	}

	public String getToFJ() {
		return toFJ;
	}

	public void setToFJ(String toFJ) {
		this.toFJ = toFJ;
	}
	
}
